//
//  BIDPublishStoreGoodsHeaderView.m
//  HJGJCommunity
//
//  Created by mal on 2017/6/17.
//  Copyright © 2017年 mal. All rights reserved.
//

#import "BIDPublishStoreGoodsHeaderView.h"
#import "BIDCustomTextView.h"
#import "BIDAddPhotoView.h"

@interface BIDPublishStoreGoodsHeaderView()<BIDAddPhotoViewDelegate>

@end

@implementation BIDPublishStoreGoodsHeaderView
@synthesize titleTF;
@synthesize contentTextView;
@synthesize addPhotoView;
@synthesize delegate;

- (void)awakeFromNib
{
    [super awakeFromNib];
    addPhotoView.delegate = self;
    contentTextView.placeholder = @"描述一下你的商品";
}

- (void)choosePhoto
{
    [delegate choosePhoto];
}

- (void)resizeViewWithFrame:(CGRect)frame
{
    CGSize screenSize = [UIScreen mainScreen].bounds.size;
    CGRect ownFrame = CGRectMake(0, 0, screenSize.width, addPhotoView.frame.origin.y+frame.size.height+20);
    self.frame = ownFrame;
    [delegate resizeViewWithFrame:ownFrame];
}

- (void)showPhotoAtIndex:(NSInteger)index withImgArr:(NSArray *)arr
{
    [delegate showPhotoAtIndex:index withImgArr:arr];
}

@end
